

const OPTINE_STATE = {
    // switchOuter: 
    arrMove: [false, false, false, false],
    areaList: [],
    areaOptionContent: [],
    moneyList: [],
    moneyOptionContent: [],
    moreList: []
}
export default function optionPage(perstate = OPTINE_STATE, action) {
    switch (action.type) {
        case 'clickMoney':
            return { ...perstate,  moneyOptionContent: action.optionList}
        case 'clickArea':
            return { ...perstate,  areaOptionContent: action.optionList}
        case 'getMoreList':
            return { ...perstate, moreList: action.list }
        case 'getMoneyList':
            return { ...perstate,  moneyList: action.list}
        case 'getAreaList':
            return { ...perstate, areaList: action.list }
        case 'click':
            let arrM = [action.index == 0 ? true : false, action.index == 1 ? true : false, action.index == 2 ? true : false, action.index == 3 ? true : false]
            return { ...perstate, key: action.name, arrMove: arrM }
        default:
            return { ...perstate }
    }
}